home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 6 / MacMania 6.toast / / Multimedia & Desktop / sk8 / SK8InJava / Code / Actors / LineSegment.java < prev    next >
Encoding:
Text File  |  1997-01-31  |  573 b   |  31 lines  |  [TEXT/CWIE]

  1.  
  2. class linesegment extends actor {
  3.  
  4. /*
  5.     public boolean pointInActor (int x, int y) {
  6.         Rectangle br = boundsrect(true);
  7.         int distance = 1;
  8.         
  9.         if ((x >= br.x) && (x <= br.x + br.width) &&
  10.             (y >= br.y) && (y <= br.y + br.height) &&
  11.             (distance <= distance)
  12.             )
  13.             return true;
  14.         else 
  15.             return false;
  16.  
  17.     }
  18.  
  19.  
  20.  
  21.     public void drawsimpleshape (paper p) {
  22.         p.g.drawLine(p.r.x, p.r.y, p.r.width, p.r.height);
  23.     }
  24.  
  25.     public void complexdraw (paper p) {
  26.         super.complexdraw(p);
  27.         p.g.setColor(sk8.black.currentColor);
  28.         p.g.drawLine(p.r.x, p.r.y, p.r.width, p.r.height);
  29.     }
  30. */
  31. }